﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uscBaoCaoDHTungTVV.ascx.cs" Inherits="WebUserControl_uscBaoCaoDHTungTVV" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.2" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>

<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraPivotGrid.Web" tagprefix="dxpgw" %>

<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>

<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />
<script type="text/javascript"  src='<%=ResolveUrl("~/JScript/jquery.alphanumeric.js")%>'></script>


<script type="text/javascript">
     function pageLoad() {
     $("#<%= TextBox1.ClientID %>").alphanumeric();

       $("#<%= Button2.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        $("#<%= Button1.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff'
        } }); 
         setTimeout($.unblockUI, 5000); 
        }); 
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  

    
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="Button2" />
</Triggers>
    <ContentTemplate>
<fieldset>
    <legend>Báo cáo danh hiệu từng TVV</legend>
    <div class="fm-req">
      <label for="TextBox1">Mã TVV:</label>
      <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
      </div>
      </fieldset>
      <div>
      <asp:Button ID="Button1" runat="server" Text="Xem báo cáo"  onclick="btnXemBaoCao_Click" />
                            &nbsp;&nbsp; 
                            <asp:Button ID="Button2" runat="server" Text="Xuất ra Excel" onclick="Button2_Click" />
      </div>
        
            <br />
       <dxwpg:ASPxPivotGrid ID="ASPxPivotGrid1" runat="server" 
            CustomizationFieldsVisible="True" CustomizationFieldsLeft="700" 
            CustomizationFieldsTop="400">
             <Fields>
          <dxwpg:PivotGridField HeaderStyle-BackColor="Yellow" ID="PivotGridField1" Area="FilterArea" AreaIndex="0" Caption="Báo Cáo Danh Hiệu Từng Tư Vấn Viên Trong Năm" 
                     FieldName="Baocao" Visible="True">
                 </dxwpg:PivotGridField>
                 
                 <dxwpg:PivotGridField HeaderStyle-BackColor="Yellow" ID="PivotGridField4" Area="FilterArea" AreaIndex="3" Caption="Giờ : " 
                     FieldName="Time" Visible="True">
                 </dxwpg:PivotGridField>
            </Fields> 
            </dxwpg:ASPxPivotGrid>
            <br />
             <dxpgw:ASPxPivotGridExporter ASPxPivotGridID="ASPxPivotGrid1" ID="ASPxPivotGridExporter1" runat="server">
        </dxpgw:ASPxPivotGridExporter>
            <uc2:uscMsgBox ID="uscMsgBox2" runat="server" />

         
    </ContentTemplate>
</asp:UpdatePanel>
